MLF: An extension of ML with first-class polymorphism and implicit instantiation. (MLF : Une extension de ML avec polymorphisme de second ordre et instanciation implicite)
نویسنده
چکیده
We propose a type system MLF that generalizes ML with first-class polymorphism as in System F. Expressions may contain second-order type annotations. Every typable expression admits a principal type, which however depends on type annotations. Principal types capture all other types that can be obtained by implicit type instantiation and they can be inferred. All expressions of ML are well-typed without any annotations. All expressions of System F can be mechanically encoded into MLF by dropping all type abstractions and type applications, and injecting type annotations of lambda-abstractions into MLF types. Moreover, only parameters of lambda-abstractions that are used polymorphically need to remain annotated.
منابع مشابه
A graphical presentation of MLF types with a linear - time local unification algorithm . Draft
MLF is a language that extends ML and System F and combines the benefits of both. We propose a dag representation of MLF types that superposes a term-dag, encoding the underlying term structure with sharing, and a tree encoding the binding structure. Compared to the original definition, this representation is more canonical, as it factors out most of the notational details; it is also closely r...
متن کاملA graphical presentation of MLF types with a linear - time local unification algorithm
MLF is a language that extends ML and System F and combines the benefits of both. We propose a dag representation of MLF types that superposes a term-dag, encoding the underlying term structure with sharing, and a tree encoding the binding structure. Compared to the original definition, this representation is more canonical as it factors out most of the notational details; it is also closely re...
متن کاملA Church-Style Intermediate Language for MLF
MLF is a type system that seamlessly merges ML-style implicit but second-class polymorphism with System-F explicit first-class polymorphism. We present xMLF, a Church-style version of MLF with full type information that can easily be maintained during reduction. All parameters of functions are explicitly typed and both type abstraction and type instantiation are explicit. However, type instanti...
متن کاملGraphic Type Constraints and Efficient Type Inference : from ML to MLF Draft Long Version
MLF is a type system that seamlessly merges ML-style type inference with System-F polymorphism. We propose a system of graphic (type) constraints that can be used to perform type inference in both ML or MLF. We show that this constraint system is a small extension of the formalism of graphic types, originally introduced to represent MLF types. We give a few semantic preserving transformations o...
متن کاملImplicit Polymorphic Type System for the Blue Calculus
The Blue Calculus is a direct extension of both the lambda and the pi calculi. In a preliminary work from GGrard Boudol, a simple type system was given that incorporates Curry's type inference for the lambda-calculus. In the present paper we study an implicit polymorphic type system, adapted from the ML typing discipline. Our typing system enjoys subject reduction and principal type properties ...
متن کامل